<div class="bpm-work">
  <div class="bpm-work-ex">
    <div class="bpm-work-ex-content">
      <div class="bpm-tabs">
        <h2 class="bpm-tabs-title">
          文章管理
        </h2>
        <div class="bpm-tabs-sub">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">基本信息</div>
        </div>
        <table>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">站点</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control">
                <nz-tree-select class="fm-input" [(ngModel)]="fs.er.siteId" nzPlaceHolder="请选择" [nzMultiple]="false"
                  [nzDropdownMatchSelectWidth]="true" [nzDropdownStyle]="{ 'max-height': '300px' }" [nzAsyncData]="true"
                  [nzNodes]="sideDic.treeDatas" (ngModelChange)="treeClick($event)">
                </nz-tree-select>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">栏目</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                <nz-tree-select class="fm-input" [(ngModel)]="fs.er.column" nzPlaceHolder="请选择" [nzMultiple]="false"
                  [nzDropdownMatchSelectWidth]="true" [nzDropdownStyle]="{ 'max-height': '300px' }" [nzAsyncData]="true"
                  [nzNodes]="columnDic.treeDatas">
                </nz-tree-select>
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label class="form-label">专题</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                <nz-tree-select class="fm-input" [(ngModel)]="fs.er.subject" nzPlaceHolder="请选择" [nzMultiple]="false"
                  [nzDropdownMatchSelectWidth]="true" [nzDropdownStyle]="{ 'max-height': '300px' }" [nzAsyncData]="true"
                  [nzNodes]="subjectDic.treeDatas">
                </nz-tree-select>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">类型</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <nz-radio-group [(ngModel)]="fs.er.mode" name="mode">
                  <label nz-radio *ngFor="let item of modeDic.datas" [nzValue]="item.id">{{item.display}}</label>
                </nz-radio-group>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">标题</nz-form-label>
            </td>
            <td colspan="3" class="form-input">
              <nz-form-control class="form-control4">
                <input nz-input [(ngModel)]="fs.er.title" name="title" />
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">完整标题</nz-form-label>
            </td>
            <td colspan="3" class="form-input">
              <nz-form-control class="form-control4">
                <input nz-input [(ngModel)]="fs.er.fullTitle" name="fullTitle" />
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">作者</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                <input nz-input [(ngModel)]="fs.er.author" name="author" />
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label class="form-label">来源</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                <input nz-input [(ngModel)]="fs.er.source" name="source" />
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">描述</nz-form-label>
            </td>
            <td colspan="3" class="form-input">
              <nz-form-control class="form-control4">
                <input nz-input [(ngModel)]="fs.er.describe" name="describe" />
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">关键词</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                <input nz-input [(ngModel)]="fs.er.main" name="main" />
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label class="form-label">状态</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                {{fs.er.stateName}}
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">发布人</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                {{fs.er.releaseName}}
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label class="form-label">发布时间</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control">
                {{fs.er.publishDate | date:'yyyy-MM-dd HH:mm:ss'}}
              </nz-form-control>
            </td>
          </tr>
        </table>

        <!-- 新闻 -->
        <div class="bpm-tabs-sub" *ngIf="fs.er.mode==='NEWS'">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">新闻详情</div>
        </div>
        <table *ngIf="fs.er.mode==='NEWS'">
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">正文</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <editor [init]="initTool" [(ngModel)]="fs.er.nr" name="nr"></editor>
              </nz-form-control>
            </td>
          </tr>
        </table>

        <!-- 图集 -->
        <div class="bpm-tabs-sub" *ngIf="fs.er.mode==='PICTURE'">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">图集详情</div>
        </div>
        <table *ngIf="fs.er.mode==='PICTURE'">
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">图集</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <nz-upload nzAction="{{ ffs.getUploadUrl() }}" [nzAccept]="'.png,.jpg'" [nzMultiple]="true"
                  [nzShowUploadList]="true" [nzShowButton]="true" [(nzFileList)]="fs.er.images" name="images"
                  (nzChange)="ffs.handleChange($event)">
                  <button nz-button><i nz-icon type="upload"></i><span>上传</span></button>
                </nz-upload>
              </nz-form-control>
            </td>
          </tr>
        </table>

        <!-- 视频 -->
        <div class="bpm-tabs-sub" *ngIf="fs.er.mode==='VIDEO'">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">视频详情</div>
        </div>
        <table *ngIf="fs.er.mode==='VIDEO'">
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">视频</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <nz-upload nzAction="{{ ffs.getUploadUrl() }}" [nzMultiple]="true" [nzShowUploadList]="true"
                  [nzShowButton]="true" [(nzFileList)]="fs.er.videos" name="videos"
                  (nzChange)="ffs.handleChange($event)">
                  <button nz-button><i nz-icon type="upload"></i><span>上传</span></button>
                </nz-upload>
              </nz-form-control>
            </td>
          </tr>
        </table>

        <!-- 下载 -->
        <div class="bpm-tabs-sub" *ngIf="fs.er.mode==='DOWNLOAD'">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">下载详情</div>
        </div>
        <table *ngIf="fs.er.mode==='DOWNLOAD'">
          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">下载文件</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <nz-upload nzAction="{{ ffs.getUploadUrl() }}" [nzMultiple]="true" [nzShowUploadList]="true"
                  [nzShowButton]="true" [(nzFileList)]="fs.er.file" name="file" (nzChange)="ffs.handleChange($event)">
                  <button nz-button><i nz-icon type="upload"></i><span>上传</span></button>
                </nz-upload>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">界面语言</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="language.invalid?'error':'success'"
                nzHasFeedback>
                <nz-select class="form-control" [(ngModel)]="fs.er.language" name="language" required
                  #language="ngModel" (nzOpenChange)="languageDic.load('0')" [nzPlaceHolder]="'请选择'">
                  <nz-option *ngFor="let option of languageDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
                  </nz-option>
                  <nz-option *ngIf="languageDic.isLoading" nzDisabled nzCustomContent>
                    <i nz-icon type="loading" class="loading-icon"></i>加载中...
                  </nz-option>
                  <span *ngIf="!languageDic.isLoaded">
                    <nz-option [nzLabel]="fs.er.languageName" [nzValue]="fs.er.language">
                    </nz-option>
                  </span>
                </nz-select>
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">授权方式</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="license.invalid?'error':'success'"
                nzHasFeedback>
                <nz-select class="form-control" [(ngModel)]="fs.er.license" name="license" required #license="ngModel"
                  (nzOpenChange)="licenseDic.load('0')" [nzPlaceHolder]="'请选择'">
                  <nz-option *ngFor="let option of licenseDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
                  </nz-option>
                  <nz-option *ngIf="licenseDic.isLoading" nzDisabled nzCustomContent>
                    <i nz-icon type="loading" class="loading-icon"></i>加载中...
                  </nz-option>
                  <span *ngIf="!licenseDic.isLoaded">
                    <nz-option [nzLabel]="fs.er.licenseName" [nzValue]="fs.er.license">
                    </nz-option>
                  </span>
                </nz-select>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">大小</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="size.invalid?'error':'success'" nzHasFeedback>
                <nz-input-number [(ngModel)]="fs.er.size" name="size" required #size="ngModel" [nzMin]="1" [nzMax]="100"
                  [nzStep]="0.5" class="form-control">
                </nz-input-number>
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">运行环境</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="system.invalid?'error':'success'" nzHasFeedback>
                <nz-select class="form-control" [(ngModel)]="fs.er.system" name="system" required #system="ngModel"
                  (nzOpenChange)="systemDic.load('0')" [nzPlaceHolder]="'请选择'">
                  <nz-option *ngFor="let option of systemDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
                  </nz-option>
                  <nz-option *ngIf="systemDic.isLoading" nzDisabled nzCustomContent>
                    <i nz-icon type="loading" class="loading-icon"></i>加载中...
                  </nz-option>
                  <span *ngIf="!systemDic.isLoaded">
                    <nz-option [nzLabel]="fs.er.systemName" [nzValue]="fs.er.system">
                    </nz-option>
                  </span>
                </nz-select>
              </nz-form-control>
            </td>
          </tr>
        </table>

        <!-- 文库 -->
        <div class="bpm-tabs-sub" *ngIf="fs.er.mode==='LIBRARY'">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">文库详情</div>
        </div>
        <table *ngIf="fs.er.mode==='LIBRARY'">
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">pdf文件</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <nz-upload nzAction="{{ ffs.getUploadUrl() }}" [nzAccept]="'.pdf'" [nzMultiple]="true"
                  [nzShowUploadList]="true" [nzShowButton]="true" [(nzFileList)]="fs.er.pdf" name="pdf"
                  (nzChange)="ffs.handleChange($event)">
                  <button nz-button><i nz-icon type="upload"></i><span>上传</span></button>
                </nz-upload>
              </nz-form-control>
            </td>
          </tr>
        </table>

        <!-- 招聘 -->
        <div class="bpm-tabs-sub" *ngIf="fs.er.mode==='RECRUIT'">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">招聘详情</div>
        </div>
        <table *ngIf="fs.er.mode==='RECRUIT'">
          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">公司名称</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="company.invalid?'error':'success'"
                nzHasFeedback>
                <input nz-input [(ngModel)]="fs.er.company" name="company" required #company="ngModel" />
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">部门名称</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="department.invalid?'error':'success'"
                nzHasFeedback>
                <input nz-input [(ngModel)]="fs.er.department" name="department" required #department="ngModel" />
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">岗位要求</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="claim.invalid?'error':'success'" nzHasFeedback>
                <input nz-input [(ngModel)]="fs.er.claim" name="claim" required #claim="ngModel" />
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">岗位职责</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="duty.invalid?'error':'success'" nzHasFeedback>
                <input nz-input [(ngModel)]="fs.er.duty" name="duty" required #duty="ngModel" />
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">招聘人数</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="number.invalid?'error':'success'" nzHasFeedback>
                <nz-input-number [(ngModel)]="fs.er.number" name="number" required #number="ngModel" [nzMin]="1"
                  [nzMax]="100" [nzStep]="1" class="form-control">
                </nz-input-number>
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">薪酬待遇</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="salary.invalid?'error':'success'" nzHasFeedback>
                <input nz-input [(ngModel)]="fs.er.salary" name="salary" required #salary="ngModel" />
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">最低学历</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="education.invalid?'error':'success'"
                nzHasFeedback>
                <input nz-input [(ngModel)]="fs.er.education" name="education" required #education="ngModel" />
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">工作经验</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="undergo.invalid?'error':'success'"
                nzHasFeedback>
                <input nz-input [(ngModel)]="fs.er.undergo" name="undergo" required #undergo="ngModel" />
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">工作性质</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="worknature.invalid?'error':'success'"
                nzHasFeedback>
                <nz-select class="form-control" [(ngModel)]="fs.er.worknature" name="worknature" required #worknature="ngModel"
                  (nzOpenChange)="workDic.load('0')" [nzPlaceHolder]="'请选择'">
                  <nz-option *ngFor="let option of workDic.datas" [nzLabel]="option.display" [nzValue]="option.id">
                  </nz-option>
                  <nz-option *ngIf="workDic.isLoading" nzDisabled nzCustomContent>
                    <i nz-icon type="loading" class="loading-icon"></i>加载中...
                  </nz-option>
                  <span *ngIf="!workDic.isLoaded">
                    <nz-option [nzLabel]="fs.er.worknatureName" [nzValue]="fs.er.worknature">
                    </nz-option>
                  </span>
                </nz-select>
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label nzRequired class="form-label">工作地点</nz-form-label>
            </td>
            <td class="form-input">
              <nz-form-control class="form-control" [nzValidateStatus]="workingplace.invalid?'error':'success'"
                nzHasFeedback>
                <input nz-input [(ngModel)]="fs.er.workingplace" name="workingplace" required #workingplace="ngModel" />
              </nz-form-control>
            </td>
          </tr>
        </table>

        <!-- 产品 -->
        <div class="bpm-tabs-sub" *ngIf="fs.er.mode==='PRODUCT'">
          <div class="bpm-tabs-sub-ioc"></div>
          <div class="bpm-tabs-sub-h2">产品详情</div>
        </div>
        <table *ngIf="fs.er.mode==='PRODUCT'">
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">产品图集</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control4">
                <nz-upload nzAction="{{ ffs.getUploadUrl() }}" [nzAccept]="'.png,.jpg'" [nzMultiple]="true"
                  [nzShowUploadList]="true" [nzShowButton]="true" [(nzFileList)]="fs.er.products" name="products"
                  (nzChange)="ffs.handleChange($event)">
                  <button nz-button><i nz-icon type="upload"></i><span>上传</span></button>
                </nz-upload>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">市场价</nz-form-label>
            </td>
            <td>
              <nz-form-control class="form-control">
                <nz-input-number [(ngModel)]="fs.er.market" name="market" [nzMin]="1" [nzMax]="100000" [nzStep]="1"
                  class="form-control">
                </nz-input-number>
              </nz-form-control>
            </td>
            <td class="form-text">
              <nz-form-label class="form-label">优惠价</nz-form-label>
            </td>
            <td>
              <nz-form-control class="form-control">
                <nz-input-number [(ngModel)]="fs.er.discount" name="discount" [nzMin]="1" [nzMax]="100000" [nzStep]="1"
                  class="form-control">
                </nz-input-number>
              </nz-form-control>
            </td>
          </tr>
          <tr>
            <td class="form-text">
              <nz-form-label class="form-label">属性</nz-form-label>
            </td>
            <td class="form-input" colspan="3">
              <nz-form-control class="form-control">
                <label nz-checkbox [(ngModel)]="fs.er.stock" name="valid">有货</label>
              </nz-form-control>
            </td>
          </tr>
        </table>
      </div>
    </div>
  </div>
  <div class="content-loading" *ngIf="fs.isLoading || fs.isSaveing">
    <nz-spin [nzSize]="'large'"></nz-spin>
  </div>
</div>
<div class="bpm-foot">
  <div class="tools">
    <div class="item" (click)="pass()" *ngIf="fs.er.state==='1' || fs.er.state==='3'">
      <i nz-icon type="save" class="icon"></i>
      <span class="form-text">发布</span>
    </div>
    <div class="item" (click)="noPass()" *ngIf="fs.er.state==='1' || fs.er.state==='2'">
      <i nz-icon type="save" class="icon"></i>
      <span class="form-text">退稿</span>
    </div>
    <div class="item" (click)="save()" *ngIf="!fs.er.state">
      <i nz-icon type="save" class="icon"></i>
      <span class="form-text">保存</span>
    </div>
    <div class="item" (click)="close()">
      <i nz-icon type="logout" class="icon"></i>
      <span class="form-text">关闭</span>
    </div>
  </div>
</div>
